package com.seari.service.Impl;

import com.seari.mapper.FlowMajorMapper;
import com.seari.pojo.FlowMajor;
import com.seari.service.FlowMajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class FlowMajorServiceImpl implements FlowMajorService
{
    @Autowired
    private FlowMajorMapper flowMajorMapper;
    @Override
    public List<FlowMajor> getFlowMajorStatu(String faultId,String tag) {

        Map<String,String> maps = new HashMap<>();
        maps.put("faultId",faultId);
        maps.put("tag",tag);
        return flowMajorMapper.getFlowMajorStatu(maps);
    }

    @Override
    public List<FlowMajor> getFlowMajorOrderDis(FlowMajor flowMajor) {
        return flowMajorMapper.getFlowMajorOrderDis(flowMajor);
    }

    @Override
    public List<FlowMajor> getFlowMajorOrderAns(FlowMajor flowMajor) {
        return flowMajorMapper.getFlowMajorOrderAns(flowMajor);
    }

    @Override
    public List<FlowMajor> getFlowMajorOrderCurrent(FlowMajor flowMajor) {
        return flowMajorMapper.getFlowMajorOrderCurrent(flowMajor);
    }

    @Override
    public int updDisposeTimeAndStatu(FlowMajor flowMajor) {
        return flowMajorMapper.updDisposeTimeAndStatu(flowMajor);
    }

    @Override
    public List<Integer> getFlowAllMajor(String faultId) {
        return flowMajorMapper.getFlowAllMajor(faultId);
    }

    @Override
    public String getAnsTimeByLinkIdForDiffTime(FlowMajor flowMajor) {
        return flowMajorMapper.getAnsTimeByLinkIdForDiffTime(flowMajor);
    }

    @Override
    public String getFlowCount(String faultId) {
        return flowMajorMapper.getFlowCount(faultId);
    }
    @Override
    public String getAnswerTimeDiff(String faultId) {
        return flowMajorMapper.getAnswerTimeDiff(faultId);
    }

    @Override
    public String getDisposeTimeDiff(String faultId) {
        return flowMajorMapper.getDisposeTimeDiff(faultId);
    }

    @Override
    public Integer getflowIsExit(String faultId) {
        return flowMajorMapper.getflowIsExit(faultId);
    }

    @Override
    public Integer getAnswerMaxLinkId(String faultId) {
        return flowMajorMapper.getAnswerMaxLinkId(faultId);
    }

    @Override
    public Integer getDisposeMinLinkId(String faultId) {
        return flowMajorMapper.getDisposeMinLinkId(faultId);
    }

    @Override
    public String getDisposeTime(String faultId) {
        return flowMajorMapper.getDisposeTime(faultId);
    }

    @Override
    public int updCurrentNodeStatu(FlowMajor flowMajor) {
        return flowMajorMapper.updCurrentNodeStatu(flowMajor);
    }

    @Override
    public int selFlowIsMajor(String faultId) {
        return flowMajorMapper.selFlowIsMajor(faultId);
    }

    @Override
    public int updAnsTimeForDisAnsDiff(FlowMajor flowMajor) {
        return flowMajorMapper.updAnsTimeForDisAnsDiff(flowMajor);
    }
}
